package com.ccxyz.ddd.controller;

import com.ccxyz.ddd.model.response.UserInfoResponse;
import com.ccxyz.ddd.application.UserInfoManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * </p>
 *
 * @author 暮雨清风
 * @date 2022/2/17 14:53
 * @since 1.0.0
 */
@RestController
@RequestMapping(value = "/userInfo")
public class UserInfoController {
    @Autowired
    private UserInfoManager userInfoManager;

    @GetMapping(value = "/{userId}")
    public UserInfoResponse userInfo(@PathVariable String userId) {
        return userInfoManager.userInfo(userId);
    }

}
